package com.jie.config;

import com.google.code.kaptcha.servlet.KaptchaServlet;
import org.springframework.boot.web.servlet.ServletRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author jie
 * @date 2019/6/4 -15:13
 */
@Configuration
public class WebCofig {

    @Bean
    ServletRegistrationBean servlet() {
        ServletRegistrationBean servletRegistrationBean = new ServletRegistrationBean(
                new KaptchaServlet(),"/code"
        );
        return servletRegistrationBean;
    }
}
